<extend name="Public/base" />
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="__PUBLIC__/admin/pl/static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/admin/pl/static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/admin/pl/lib/Hui-iconfont/1.0.7/iconfont.css" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/admin/pl/lib/icheck/icheck.css" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/admin/pl/static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/admin/pl/static/h-ui.admin/css/style.css" />
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>栏目管理</title>
</head>
<{// 导航}>
<block name="breadcrumb">
<li class="active">栏目管理</li>
</block>

<{// 左侧菜单}>
<block name="sidebar">
	<include file="Public/sidebar" nav="user"/>
</block>

<block name="main">

	<div class="cl pd-5 bg-1 bk-gray mt-20"> <span class="l"><a href="javascript:;" onclick="datadel()" class="btn btn-danger radius"><i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a> <a class="btn btn-primary radius" onclick="system_category_add('','system-category_add.html')" href="javascript:;"><i class="Hui-iconfont">&#xe600;</i> 添加栏目</a></span> <span class="r"><strong></strong> </span> </div>
	<div class="mt-20">
		<table class="table table-border table-bordered table-hover table-bg table-sort">
			<thead>
				<tr class="text-c">
					 <th class="tc" width="5%"><input class="allChoose" name="" id='check' type="checkbox"></th>
                     <th width="80">排序</th>
                     <th width="80">ID</th>
					<th width="80">栏目名称</th>
					<th width="80">栏目类型</th>
					<th width="80">缩略图</th>
					<th width="100">操作</th>
				</tr>
			</thead>
			   <volist name="cates" id="vo">
                        <tr>
                            <td class="tc"><input name="ids[]" value="<{$vo.id}>" class="check" type="checkbox"></td>
                            <td>
                               
                                <input class="common-input sort-input" name="<{$vo.id}>" value="<{$vo.sort}>" type="text">
                            </td>
                            <td><{$vo.id}></td>
                            <td><if condition="$vo['parentid'] neq 0">|</if><?php echo str_repeat('-', $vo['level']*8);?><{$vo.name}></td>
                            <td>
                            <if condition="$vo['type'] eq 1">  
                            列表 
                            </if>
                            <if condition="$vo['type'] eq 2">  
                            单页
                            </if>
                            <if condition="$vo['type'] eq 3">  
                            留言
                            </if>
                            <if condition="$vo['type'] eq 4">  
                            招聘
                            </if>
                            <if condition="$vo['type'] eq 5">  
                            车辆列表
                            </if>
                            <if condition="$vo['type'] eq 6">  
                            荣誉列表
                            </if>
                            <if condition="$vo['type'] eq 7">  
                            求职表
                            </if>
                            </td>
                            <td>
                             <if condition="$vo['pic'] neq ''">   
                            <img src="__ROOT__<{$vo.pic}>" height="50">
                            <else />
                            暂无缩略图
                            </if>
                            </td>
                            <td>
                              <if condition="$vo['pc'] eq 1">PC端
                              <else />
                              移动端
                              </if>  

                            </td>
                            <td>
                                <a class="link-update" href="__CONTROLLER__/edit/id/<{$vo.id}>">修改</a>
                                <a class="link-del" onclick="return confirm('确定删除本栏目及其子栏目？');" href="__CONTROLLER__/del/id/<{$vo.id}>">删除</a>
                            </td>
                        </tr>
                        </volist>
		</table>
	</div>
</div>
<script type="text/javascript" src="__PUBLIC__/admin/pl/lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="__PUBLIC__/admin/pl/lib/layer/2.1/layer.js"></script>
<script type="text/javascript" src="__PUBLIC__/admin/pl/lib/datatables/1.10.0/jquery.dataTables.min.js"></script> 
<script type="text/javascript" src="__PUBLIC__/admin/pl/static/h-ui/js/H-ui.js"></script> 
<script type="text/javascript" src="__PUBLIC__/admin/pl/static/h-ui.admin/js/H-ui.admin.js"></script> 
<script type="text/javascript">
$('.table-sort').dataTable({
	"aaSorting": [[ 1, "desc" ]],//默认第几个排序
	"bStateSave": true,//状态保存
	"aoColumnDefs": [
	  //{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
	  {"orderable":false,"aTargets":[0,4]}// 制定列不参与排序
	]
});
系统-栏目-添加
function system_category_add(title,url,w,h){
	layer_show(title,url,w,h);
}

</script>

</block>
</html>
<script type="text/javascript">
    $("#check").click(function(){
        if($(this).attr("checked"))
        {
            $(".check").attr("checked","checked")
        }else
        {
            $(".check").removeAttr("checked")
        }
    })
</script>